package current.security.user.domain;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Proxy;

@Proxy(lazy = true)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Entity(name="R_Resc")
@Table(name="TBL_ROLE_RESC")
public class R_Resc {
	@Id
	@GenericGenerator(name="idGenerator", strategy="uuid") //这个是hibernate的注解
	@GeneratedValue(generator="idGenerator") //使用uuid的生成策略
	private String id;
	@ManyToOne
	@JoinColumn(name="rescid")
	private Resc resc;
	@ManyToOne       
	@JoinColumn(name="roleid")
	private Role role;
	
	public Resc getResc() {
		return resc;
	}

	public void setResc(Resc resc) {
		this.resc = resc;
	}
	
	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
}
